import Cookies from 'js-cookie'

const TokenKey = 'User-Token'
const DataKey = 'User-Data'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token,{ expires: 365 })
}

export function getData() {
  return Cookies.getJSON(DataKey)
}

export function setData(data) {
  return Cookies.set(DataKey, data,{ expires: 365 })
}


export function removeToken() {
  return Cookies.remove(TokenKey)
}